package com.ourteam.product.requirement.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Tue Nov 07 10:29:34 CST 2017
 * Auto Generate Date : 2018-05-03 16:46:02
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class ProductIssueChangeLogBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.Id);

        mappedDaoFields.put("producrIssueId",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.ProducrIssueId);

        mappedDaoFields.put("beforeChangeStatus",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.BeforeChangeStatus);

        mappedDaoFields.put("afterChangeStatus",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.AfterChangeStatus);

        mappedDaoFields.put("operatorId",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.OperatorId);

        mappedDaoFields.put("operateTime",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.OperateTime);

        mappedDaoFields.put("status",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.Remarks);

        mappedDaoFields.put("operatorName",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.OperatorName);

        mappedDaoFields.put("operatorPhoto",
            com.ourteam.product.requirement.dao.IProductIssueChangeLogDAO.OperatorPhoto);
    }

    private com.ourteam.product.requirement.dao.ProductIssueChangeLog productIssueChangeLog;

    public ProductIssueChangeLogBean() {
        super();

        this.productIssueChangeLog = new com.ourteam.product.requirement.dao.ProductIssueChangeLog();
    }

    public ProductIssueChangeLogBean(
        com.ourteam.product.requirement.dao.ProductIssueChangeLog productIssueChangeLog) {
        super();

        this.productIssueChangeLog = productIssueChangeLog;
    }

    public BeanMap getBeanMap() {
        return new BeanMap(productIssueChangeLog);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.product.requirement.dao.ProductIssueChangeLog convertToProductIssueChangeLog() {
        return this.productIssueChangeLog;
    }

    public com.ourteam.product.requirement.dao.ProductIssueChangeLog convertTo() {
        return this.productIssueChangeLog;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.productIssueChangeLog.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.productIssueChangeLog.setId(id);
    }

    /**
     * Get producrIssueId
     *
     * @return long
     */
    public long getProducrIssueId() {
        return (long) this.productIssueChangeLog.getProducrIssueId();
    }

    /**
     * Set producrIssueId
     *
     * @parameter long
     */
    public void setProducrIssueId(long producrIssueId) {
        this.productIssueChangeLog.setProducrIssueId(producrIssueId);
    }

    /**
     * Get beforeChangeStatus
     *
     * @return String
     */
    public String getBeforeChangeStatus() {
        return (String) this.productIssueChangeLog.getBeforeChangeStatus();
    }

    /**
     * Set beforeChangeStatus
     *
     * @parameter String
     */
    public void setBeforeChangeStatus(String beforeChangeStatus) {
        this.productIssueChangeLog.setBeforeChangeStatus(beforeChangeStatus);
    }

    /**
     * Get afterChangeStatus
     *
     * @return String
     */
    public String getAfterChangeStatus() {
        return (String) this.productIssueChangeLog.getAfterChangeStatus();
    }

    /**
     * Set afterChangeStatus
     *
     * @parameter String
     */
    public void setAfterChangeStatus(String afterChangeStatus) {
        this.productIssueChangeLog.setAfterChangeStatus(afterChangeStatus);
    }

    /**
     * Get operatorId
     *
     * @return long
     */
    public long getOperatorId() {
        return (long) this.productIssueChangeLog.getOperatorId();
    }

    /**
     * Set operatorId
     *
     * @parameter long
     */
    public void setOperatorId(long operatorId) {
        this.productIssueChangeLog.setOperatorId(operatorId);
    }

    /**
     * Get operateTime
     *
     * @return java.util.Date
     */
    public java.util.Date getOperateTime() {
        return (java.util.Date) this.productIssueChangeLog.getOperateTime();
    }

    /**
     * Set operateTime
     *
     * @parameter java.util.Date
     */
    public void setOperateTime(java.util.Date operateTime) {
        this.productIssueChangeLog.setOperateTime(operateTime);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.productIssueChangeLog.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.productIssueChangeLog.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.productIssueChangeLog.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.productIssueChangeLog.setRemarks(remarks);
    }

    /**
     * Get operatorName
     *
     * @return String
     */
    public String getOperatorName() {
        return (String) this.productIssueChangeLog.getOperatorName();
    }

    /**
     * Get operatorPhoto
     *
     * @return String
     */
    public String getOperatorPhoto() {
        return (String) this.productIssueChangeLog.getOperatorPhoto();
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ProductIssueChangeLogBean) == false) {
            return false;
        } // end if

        ProductIssueChangeLogBean other = (ProductIssueChangeLogBean) obj;

        boolean isEqual = false;

        com.ourteam.product.requirement.dao.ProductIssueChangeLog tempProductIssueChangeLog =
            other.convertToProductIssueChangeLog();

        if ((tempProductIssueChangeLog == null) ||
                (this.productIssueChangeLog == null)) {
            isEqual = false;
        } else if ((tempProductIssueChangeLog == this.productIssueChangeLog) ||
                tempProductIssueChangeLog.equals(this.productIssueChangeLog)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static ProductIssueChangeLogBean[] toArray(
        com.ourteam.product.requirement.dao.ProductIssueChangeLog[] aProductIssueChangeLogs) {
        return toArray(aProductIssueChangeLogs, null);
    }

    public static ProductIssueChangeLogBean[] toArray(
        com.ourteam.product.requirement.dao.ProductIssueChangeLog[] aProductIssueChangeLogs,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aProductIssueChangeLogs)) {
            return new ProductIssueChangeLogBean[0];
        }

        int length = aProductIssueChangeLogs.length;

        ProductIssueChangeLogBean[] beans = new ProductIssueChangeLogBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new ProductIssueChangeLogBean(aProductIssueChangeLogs[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aProductIssueChangeLogs[i] });
            }
        }

        return beans;
    }
}
